package com.google.code.tcx2nike;

/**
 * Main application.
 * 
 * 
 * 
 */
public class Main {

	/**
	 * Main application entry point.
	 */
	public static void main(String[] args) {

		String usage = new File("resources/usage.txt").text
		
		println usage
			
		
		// read xml file
		def tcx = new GarminWorkoutData("examples/garmin/activity.tcx")
		tcx.process()

		//generate converter and feed it with garmin data
		Garmin2NikeConverter converter = new Garmin2NikeConverter(tcx)
		
		//write xml file
		NikeWorkoutData nike =  converter.convert()
		nike.init()
		nike.buildXml()
		println nike.toString()
	}
}